import java.util.Scanner;

public class Text1 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String str=sc.nextLine();
        for (int i = 0; i <str.length() ; i++) {
            char ch=str.charAt(i);
            if(ch>91) {
                ch = (char) (ch - 32);
            }else {
                ch+=32;
            }
            System.out.println(ch);
        }

    }
}
